{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "female-routine",
   "metadata": {},
   "source": [
    "# Simple forward FC neural network\n",
    "## Import relate package"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "empirical-piano",
   "metadata": {},
   "outputs": [],
   "source": [
    "import torch\n",
    "from torch import nn,Tensor\n",
    "from torch.nn import functional as F"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "exposed-titanium",
   "metadata": {},
   "source": [
    "## Define a network model"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 71,
   "id": "supreme-drain",
   "metadata": {},
   "outputs": [],
   "source": [
    "class IrisNet(nn.Module):\n",
    "    def __init__(self,n_feature,n_hidden,n_output):\n",
    "        super().__init__()\n",
    "        self.model = nn.Sequential(\n",
    "            nn.Linear(n_feature,n_hidden),\n",
    "            nn.LeakyReLU(),\n",
    "            nn.Linear(n_hidden,n_output),\n",
    "            nn.Softmax(dim=1)\n",
    "        )\n",
    "        \n",
    "    def forward(self,x):\n",
    "        return self.model(x)  \n",
    "    \n",
    "    def score(self,test_data):\n",
    "        features,truth = test_data[:][0],test_data[:][1]\n",
    "        pred = self(features)\n",
    "        pred = pred.argmax(dim=1)\n",
    "        truth = truth.argmax(dim=1)\n",
    "        n = len(pred)\n",
    "        return sum(pred==truth)/n\n",
    "        "
   ]
  },
  {
   "cell_type": "markdown",
   "id": "animal-offering",
   "metadata": {},
   "source": [
    "## Preprocess and prepare dataset"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "id": "intellectual-contributor",
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.datasets import load_iris\n",
    "from sklearn.preprocessing import OneHotEncoder\n",
    "from torch.utils.data import Dataset,DataLoader,random_split\n",
    "\n",
    "\n",
    "class IrisDataset(Dataset):\n",
    "    def __init__(self):\n",
    "        raw = load_iris()\n",
    "        self.features = raw['data']\n",
    "        self.labels = raw['target'].reshape(-1,1)\n",
    "        label_encoder = OneHotEncoder(sparse=False)\n",
    "        self.x = Tensor(self.features)\n",
    "        self.y = Tensor(label_encoder.fit_transform(self.labels))\n",
    "               \n",
    "    def __len__(self):\n",
    "        return self.x.shape[0]\n",
    "    \n",
    "    def __getitem__(self,idx):\n",
    "        return self.x[idx],self.y[idx]\n",
    "    \n",
    "dataset = IrisDataset()\n",
    "test_count = 50\n",
    "train_count = len(dataset) - 50\n",
    "train_data,test_data = random_split(dataset,(train_count,test_count))\n",
    "train_dataloader = DataLoader(train_data, batch_size=64, shuffle=True)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "burning-listing",
   "metadata": {},
   "source": [
    "## Train the network"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 72,
   "id": "assigned-cargo",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x1e30ffa76a0>]"
      ]
     },
     "execution_count": 72,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAEGCAYAAAB/+QKOAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Il7ecAAAACXBIWXMAAAsTAAALEwEAmpwYAAA4mklEQVR4nO3dd5xU5dnw8d+1naUjTeqCdFFAVxSwoYioiZjYjbFEX41Rk2jUYE80MTxqNOaxYWJ/7KIJClJEwAIiS5e+IGWRsvSybJnd+/3jlD0zc2Z2Zndn6/X9fDaZU+bMPTN4rrnbdYsxBqWUUipUUm0XQCmlVN2kAUIppZQvDRBKKaV8aYBQSinlSwOEUkopXym1XYDq0rZtW5OVlVXbxVBKqXpl4cKFu4wx7fyONZgAkZWVRU5OTm0XQyml6hUR2RTpmDYxKaWU8qUBQimllC8NEEoppXxpgFBKKeVLA4RSSilfGiCUUkr50gChlFLKV6MPEIeKAjw1Yy2LN++t7aIopVSd0ugDRHGgjH/OXMfSLftquyhKKVWnNPoAkZFqfQRF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s7P/7End38vEflcRJaKyCIROca+fDMpX9fhLXuWsFK1RgOEUjESkf7A5cAIY8xgoBT4BVayuBxjzLHAHKz8+wBvAH80xhyPNbvV2f8W8JwxZhAwHGu2LFgZd3+PtTZJT6z8QkrVmpSKT1FK2c4GTgQW2D/um2AlSysD3rPP+T/gIxFpCbQyxsyx978OfCAizYHOxpiPAYwxhQD29b4zxuTZ20uw1gL4OuHvSqkINEAoFTsBXjfG3Bu0U+TBkPMqm7+myPO4FP3vU9UybWJSKnYzgUtEpD246wN3x/rvyMkiehXwtTFmP7BXRE6z9/8SmGOMOQjkichF9jXSRSSzJt+EUrHSXyhKxcgYs1JEHgCmi0gSVpbNW7EW6RlqH9uJ1U8BVjrmF+0AsAG43t7/S2CCiDxiX+PSGnwbSsVMs7kqVUUicsgY06y2y6FUddMmJqWUUr60BqGUUsqX1iCUUkr50gChlFLKlwYIpZRSvjRAKKWU8qUBQimllK//D79saVHjSu8LAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "from matplotlib import pyplot as plt\n",
    "\n",
    "net = IrisNet(4,20,3)\n",
    "loss_func = nn.MSELoss()\n",
    "optimizer = torch.optim.SGD(net.parameters(),lr=.05)\n",
    "\n",
    "verbose_loss = [] \n",
    "\n",
    "epochs = 10 ** 3\n",
    "for epoch in range(epochs):\n",
    "    for features,labels in train_dataloader:\n",
    "        pred = net(features)\n",
    "        loss = loss_func(pred,labels)\n",
    "        net.zero_grad()\n",
    "        loss.backward()\n",
    "        optimizer.step()  \n",
    "    verbose_loss.append(loss)\n",
    "    \n",
    "plt.xlabel('epoch')\n",
    "plt.ylabel('loss')\n",
    "plt.plot(list(range(epochs)),verbose_loss)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 73,
   "id": "macro-major",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "accuracy:100.00%\n"
     ]
    }
   ],
   "source": [
    "accuracy = net.score(test_data).item()\n",
    "print(f'accuracy:{100*accuracy:.2f}%')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "resistant-mozambique",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
